package com.wutianyi.module.product.mapper;

import java.util.List;

import com.wutianyi.module.commons.Query;
import com.wutianyi.module.product.dataobject.ProductDO;
import com.wutianyi.module.product.dataobject.ProductDTO;

/**
 * @author wutianyi
 * 
 */
public interface ProductMapper {
	public ProductDTO getProductDTO();
	
	public int createProduct(ProductDO product);
	
	public ProductDO getProduct(Query query);
	
	public List<ProductDO> listProductsByCompanyId(Query query);
	
	public List<ProductDTO> listProductDTOsByCompanyId(int companyId);
	
	public List<ProductDTO> paginateProductDTOsByCompanyId(Query query);
	
	public int listProductCountByCompanyId(int companyId);
	
	public int updateProduct(ProductDO product);
	
	public int deleteProduct(Query query);
	
	public List<ProductDO> listLastestProducts(int count);
}
